home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 April: Mac OS SDK / Dev.CD Apr 97 SDK1.toast / Development Kits (Disc 1) / ColorSync 2.1.2 GM / Interfaces / AIncludes / CMApplication.a < prev    next >
Encoding:
Text File  |  1997-02-18  |  46.6 KB  |  1,939 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        CMApplication.a
  3. ;
  4. ;    Contains:    Color Matching Interfaces
  5. ;
  6. ;    Version:    ColorSync 2.1
  7. ;
  8. ;    Copyright:    © 1984-1996 by Apple Computer, Inc.
  9. ;                All rights reserved.
  10. ;
  11. ;    Bugs?:        If you find a problem with this file, send the file and version
  12. ;                information (from above) and the problem description to:
  13. ;
  14. ;                    Internet:    apple.bugs@applelink.apple.com
  15. ;                    AppleLink:    APPLE.BUGS
  16. ;
  17. ;
  18.     IF &TYPE('__CMAPPLICATION__') = 'UNDEFINED' THEN
  19. __CMAPPLICATION__ SET 1
  20.  
  21.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  22.     include 'Types.a'
  23.     ENDIF
  24.     IF &TYPE('__QUICKDRAW__') = 'UNDEFINED' THEN
  25.     include 'Quickdraw.a'
  26.     ENDIF
  27.     IF &TYPE('__FILES__') = 'UNDEFINED' THEN
  28.     include 'Files.a'
  29.     ENDIF
  30.     IF &TYPE('__PRINTING__') = 'UNDEFINED' THEN
  31.     include 'Printing.a'
  32.     ENDIF
  33.     IF &TYPE('__CMICCPROFILE__') = 'UNDEFINED' THEN
  34.     include 'CMICCProfile.a'
  35.     ENDIF
  36.  
  37. gestaltColorSync20                EQU        $0200
  38. gestaltColorSync21                EQU        $0210
  39.  
  40. kDefaultCMMSignature            EQU        'appl'
  41. ;  Macintosh 68K trap word 
  42.  
  43. cmTrap                            EQU        $ABEE
  44. ;  PicComment IDs 
  45.  
  46. cmBeginProfile                    EQU        220
  47. cmEndProfile                    EQU        221
  48. cmEnableMatching                EQU        222
  49. cmDisableMatching                EQU        223
  50. cmComment                        EQU        224
  51. ;  PicComment selectors for cmComment 
  52.  
  53. cmBeginProfileSel                EQU        0
  54. cmContinueProfileSel            EQU        1
  55. cmEndProfileSel                    EQU        2
  56. cmProfileIdentifierSel            EQU        3
  57. ;  Defines for version 1.0 CMProfileSearchRecord.fieldMask 
  58.  
  59. cmMatchCMMType                    EQU        $00000001
  60. cmMatchApplProfileVersion        EQU        $00000002
  61. cmMatchDataType                    EQU        $00000004
  62. cmMatchDeviceType                EQU        $00000008
  63. cmMatchDeviceManufacturer        EQU        $00000010
  64. cmMatchDeviceModel                EQU        $00000020
  65. cmMatchDeviceAttributes            EQU        $00000040
  66. cmMatchFlags                    EQU        $00000080
  67. cmMatchOptions                    EQU        $00000100
  68. cmMatchWhite                    EQU        $00000200
  69. cmMatchBlack                    EQU        $00000400
  70. ;  Defines for version 2.0 CMSearchRecord.searchMask 
  71.  
  72. cmMatchAnyProfile                EQU        $00000000
  73. cmMatchProfileCMMType            EQU        $00000001
  74. cmMatchProfileClass                EQU        $00000002
  75. cmMatchDataColorSpace            EQU        $00000004
  76. cmMatchProfileConnectionSpace    EQU        $00000008
  77. cmMatchManufacturer                EQU        $00000010
  78. cmMatchModel                    EQU        $00000020
  79. cmMatchAttributes                EQU        $00000040
  80. cmMatchProfileFlags                EQU        $00000080
  81. ;  Result codes 
  82.  
  83.                                                             ; General Errors 
  84. cmProfileError                    EQU        -170
  85. cmMethodError                    EQU        -171
  86. cmMethodNotFound                EQU        -175                ; CMM not present 
  87. cmProfileNotFound                EQU        -176                ; Responder error 
  88. cmProfilesIdentical                EQU        -177                ; Profiles the same 
  89. cmCantConcatenateError            EQU        -178                ; Profile can't be concatenated 
  90. cmCantXYZ                        EQU        -179                ; CMM cant handle XYZ space 
  91. cmCantDeleteProfile                EQU        -180                ; Responder error 
  92. cmUnsupportedDataType            EQU        -181                ; Responder error 
  93. cmNoCurrentProfile                EQU        -182                ; Responder error 
  94.                                                             ; Profile Access Errors 
  95. cmElementTagNotFound            EQU        -4200
  96. cmIndexRangeErr                    EQU        -4201                ; Tag index out of range 
  97. cmCantDeleteElement                EQU        -4202
  98. cmFatalProfileErr                EQU        -4203
  99. cmInvalidProfile                EQU        -4204                ; A Profile must contain a 'cs1 ' tag to be valid 
  100. cmInvalidProfileLocation        EQU        -4205                ; Operation not supported for this profile location 
  101. cmCantCopyModifiedV1Profile        EQU        -4215                ; Illegal to copy version 1 profiles that have been modified 
  102.                                                             ; Profile Search Errors 
  103. cmInvalidSearch                    EQU        -4206                ; Bad Search Handle 
  104. cmSearchError                    EQU        -4207
  105. cmErrIncompatibleProfile        EQU        -4208                ; Other ColorSync Errors 
  106. cmInvalidColorSpace                EQU        -4209                ; Profile colorspace does not match bitmap type 
  107. cmInvalidSrcMap                    EQU        -4210                ; Source pix/bit map was invalid 
  108. cmInvalidDstMap                    EQU        -4211                ; Destination pix/bit map was invalid 
  109. cmNoGDevicesError                EQU        -4212                ; Begin/End Matching -- no gdevices available 
  110. cmInvalidProfileComment            EQU        -4213                ; Bad Profile comment during drawpicture 
  111. cmRangeOverFlow                    EQU        -4214                ; Color conversion warning that some output color values over/underflowed and were clipped 
  112. cmNamedColorNotFound            EQU        -4216                ; NamedColor not found 
  113. cmCantGamutCheckError            EQU        -4217                ; Gammut checking not supported by this ColorWorld 
  114. ;  deviceType values for ColorSync 1.0 Device Profile access 
  115.  
  116. cmSystemDevice                    EQU        'sys '
  117. cmGDevice                        EQU        'gdev'
  118. ;  Commands for CMFlattenUPP(…) 
  119.  
  120. cmOpenReadSpool                    EQU        1
  121. cmOpenWriteSpool                EQU        2
  122. cmReadSpool                        EQU        3
  123. cmWriteSpool                    EQU        4
  124. cmCloseSpool                    EQU        5
  125. ;  Flags for PostScript-related functions 
  126.  
  127. cmPS7bit                        EQU        1
  128. cmPS8bit                        EQU        2
  129. ;  Flags for profile embedding functions 
  130.  
  131. cmEmbedWholeProfile                EQU        $00000000
  132. cmEmbedProfileIdentifier        EQU        $00000001
  133. ;  Commands for CMAccessUPP(…) 
  134.  
  135. cmOpenReadAccess                EQU        1
  136. cmOpenWriteAccess                EQU        2
  137. cmReadAccess                    EQU        3
  138. cmWriteAccess                    EQU        4
  139. cmCloseAccess                    EQU        5
  140. cmCreateNewAccess                EQU        6
  141. cmAbortWriteAccess                EQU        7
  142. cmBeginAccess                    EQU        8
  143. cmEndAccess                        EQU        9
  144. ;  Caller-supplied flatten function 
  145. ;  Caller-supplied progress function for Bitmap & PixMap matching routines 
  146. ;  Caller-supplied filter function for Profile search 
  147. ;  Caller-supplied function for profile access 
  148. ; typedef long                             CMError
  149.  
  150. ;  For 1.0 and 2.0 profile header variants 
  151. ;  CMAppleProfileHeader 
  152. CMAppleProfileHeader    RECORD 0
  153. cm1                         ds        CMHeader        ; offset: $0 (0)
  154.                          ORG 0
  155. cm2                         ds        CM2Header        ; offset: $0 (0)
  156. sizeof                     EQU *                    ; size:   $80 (128)
  157.                         ENDR
  158. ;  Param for CWConcatColorWorld(…) 
  159. CMConcatProfileSet        RECORD 0
  160. keyIndex                 ds.w    1                ; offset: $0 (0)        ;  Zero-based 
  161. count                     ds.w    1                ; offset: $2 (2)        ;  Min 1 
  162. profileSet                 ds.l    1                ; offset: $4 (4) <-- really an array of length one ;  Variable. Ordered from Source -> Dest 
  163. sizeof                     EQU *                    ; size:   $8 (8)
  164.                         ENDR
  165. ;  ColorSync color data types 
  166. CMRGBColor                RECORD 0
  167. red                         ds.w    1                ; offset: $0 (0)        ;  0..65535 
  168. green                     ds.w    1                ; offset: $2 (2)
  169. blue                     ds.w    1                ; offset: $4 (4)
  170. sizeof                     EQU *                    ; size:   $6 (6)
  171.                         ENDR
  172. CMCMYKColor                RECORD 0
  173. cyan                     ds.w    1                ; offset: $0 (0)        ;  0..65535 
  174. magenta                     ds.w    1                ; offset: $2 (2)
  175. yellow                     ds.w    1                ; offset: $4 (4)
  176. black                     ds.w    1                ; offset: $6 (6)
  177. sizeof                     EQU *                    ; size:   $8 (8)
  178.                         ENDR
  179. CMCMYColor                RECORD 0
  180. cyan                     ds.w    1                ; offset: $0 (0)        ;  0..65535 
  181. magenta                     ds.w    1                ; offset: $2 (2)
  182. yellow                     ds.w    1                ; offset: $4 (4)
  183. sizeof                     EQU *                    ; size:   $6 (6)
  184.                         ENDR
  185. CMHLSColor                RECORD 0
  186. hue                         ds.w    1                ; offset: $0 (0)        ;  0..65535. Fraction of circle. Red at 0 
  187. lightness                 ds.w    1                ; offset: $2 (2)        ;  0..65535 
  188. saturation                 ds.w    1                ; offset: $4 (4)        ;  0..65535 
  189. sizeof                     EQU *                    ; size:   $6 (6)
  190.                         ENDR
  191. CMHSVColor                RECORD 0
  192. hue                         ds.w    1                ; offset: $0 (0)        ;  0..65535. Fraction of circle. Red at 0 
  193. saturation                 ds.w    1                ; offset: $2 (2)        ;  0..65535 
  194. value                     ds.w    1                ; offset: $4 (4)        ;  0..65535 
  195. sizeof                     EQU *                    ; size:   $6 (6)
  196.                         ENDR
  197. CMLabColor                RECORD 0
  198. L                         ds.w    1                ; offset: $0 (0)        ;  0..65535 maps to 0..100 
  199. a                         ds.w    1                ; offset: $2 (2)        ;  0..65535 maps to -128..127.996 
  200. b                         ds.w    1                ; offset: $4 (4)        ;  0..65535 maps to -128..127.996 
  201. sizeof                     EQU *                    ; size:   $6 (6)
  202.                         ENDR
  203. CMLuvColor                RECORD 0
  204. L                         ds.w    1                ; offset: $0 (0)        ;  0..65535 maps to 0..100 
  205. u                         ds.w    1                ; offset: $2 (2)        ;  0..65535 maps to -128..127.996 
  206. v                         ds.w    1                ; offset: $4 (4)        ;  0..65535 maps to -128..127.996 
  207. sizeof                     EQU *                    ; size:   $6 (6)
  208.                         ENDR
  209. CMYxyColor                RECORD 0
  210. capY                     ds.w    1                ; offset: $0 (0)        ;  0..65535 maps to 0..1 
  211. x                         ds.w    1                ; offset: $2 (2)        ;  0..65535 maps to 0..1 
  212. y                         ds.w    1                ; offset: $4 (4)        ;  0..65535 maps to 0..1 
  213. sizeof                     EQU *                    ; size:   $6 (6)
  214.                         ENDR
  215. CMGrayColor                RECORD 0
  216. gray                     ds.w    1                ; offset: $0 (0)        ;  0..65535 
  217. sizeof                     EQU *                    ; size:   $2 (2)
  218.                         ENDR
  219. CMMultichannel5Color    RECORD 0
  220. components                 ds.b    5                ; offset: $0 (0)        ;  0..255 
  221.                          ORG 6
  222. sizeof                     EQU *                    ; size:   $6 (6)
  223.                         ENDR
  224. CMMultichannel6Color    RECORD 0
  225. components                 ds.b    6                ; offset: $0 (0)        ;  0..255 
  226. sizeof                     EQU *                    ; size:   $6 (6)
  227.                         ENDR
  228. CMMultichannel7Color    RECORD 0
  229. components                 ds.b    7                ; offset: $0 (0)        ;  0..255 
  230.                          ORG 8
  231. sizeof                     EQU *                    ; size:   $8 (8)
  232.                         ENDR
  233. CMMultichannel8Color    RECORD 0
  234. components                 ds.b    8                ; offset: $0 (0)        ;  0..255 
  235. sizeof                     EQU *                    ; size:   $8 (8)
  236.                         ENDR
  237. CMNamedColor            RECORD 0
  238. namedColorIndex             ds.l    1                ; offset: $0 (0)        ;  0..a lot 
  239. sizeof                     EQU *                    ; size:   $4 (4)
  240.                         ENDR
  241. CMColor                    RECORD 0
  242. rgb                         ds        CMRGBColor        ; offset: $0 (0)
  243.                          ORG 0
  244. hsv                         ds        CMHSVColor        ; offset: $0 (0)
  245.                          ORG 0
  246. hls                         ds        CMHLSColor        ; offset: $0 (0)
  247.                          ORG 0
  248. XYZ                         ds        CMXYZColor        ; offset: $0 (0)
  249.                          ORG 0
  250. Lab                         ds        CMLabColor        ; offset: $0 (0)
  251.                          ORG 0
  252. Luv                         ds        CMLuvColor        ; offset: $0 (0)
  253.                          ORG 0
  254. Yxy                         ds        CMYxyColor        ; offset: $0 (0)
  255.                          ORG 0
  256. cmyk                     ds        CMCMYKColor        ; offset: $0 (0)
  257.                          ORG 0
  258. cmy                         ds        CMCMYColor        ; offset: $0 (0)
  259.                          ORG 0
  260. gray                     ds        CMGrayColor        ; offset: $0 (0)
  261.                          ORG 0
  262. mc5                         ds        CMMultichannel5Color ; offset: $0 (0)
  263.                          ORG 0
  264. mc6                         ds        CMMultichannel6Color ; offset: $0 (0)
  265.                          ORG 0
  266. mc7                         ds        CMMultichannel7Color ; offset: $0 (0)
  267.                          ORG 0
  268. mc8                         ds        CMMultichannel8Color ; offset: $0 (0)
  269.                          ORG 0
  270. namedColor                 ds        CMNamedColor    ; offset: $0 (0)
  271.                          ORG 8
  272. sizeof                     EQU *                    ; size:   $8 (8)
  273.                         ENDR
  274. CMProfileSearchRecord    RECORD 0
  275. header                     ds        CMHeader        ; offset: $0 (0)
  276. fieldMask                 ds.l    1                ; offset: $40 (64)
  277. reserved                 ds.l    2                ; offset: $44 (68)
  278. sizeof                     EQU *                    ; size:   $4C (76)
  279.                         ENDR
  280. ; typedef struct CMProfileSearchRecord * CMProfileSearchRecordPtr
  281.  
  282. ; typedef CMProfileSearchRecordPtr *    CMProfileSearchRecordHandle
  283.  
  284. ;  Search definition for 2.0 
  285. CMSearchRecord            RECORD 0
  286. CMMType                     ds.l    1                ; offset: $0 (0)
  287. profileClass             ds.l    1                ; offset: $4 (4)
  288. dataColorSpace             ds.l    1                ; offset: $8 (8)
  289. profileConnectionSpace     ds.l    1                ; offset: $C (12)
  290. deviceManufacturer         ds.l    1                ; offset: $10 (16)
  291. deviceModel                 ds.l    1                ; offset: $14 (20)
  292. deviceAttributes         ds.l    2                ; offset: $18 (24)
  293. profileFlags             ds.l    1                ; offset: $20 (32)
  294. searchMask                 ds.l    1                ; offset: $24 (36)
  295. filter                     ds.l    1                ; offset: $28 (40)
  296. sizeof                     EQU *                    ; size:   $2C (44)
  297.                         ENDR
  298. ;  GetCWInfo structures 
  299. CMMInfoRecord            RECORD 0
  300. CMMType                     ds.l    1                ; offset: $0 (0)
  301. CMMVersion                 ds.l    1                ; offset: $4 (4)
  302. sizeof                     EQU *                    ; size:   $8 (8)
  303.                         ENDR
  304. CMCWInfoRecord            RECORD 0
  305. cmmCount                 ds.l    1                ; offset: $0 (0)
  306. cmmInfo                     ds.b    2 * CMMInfoRecord.sizeof ; offset: $4 (4)
  307. sizeof                     EQU *                    ; size:   $14 (20)
  308.                         ENDR
  309. ;  profile identifier structures 
  310. CMProfileIdentifier        RECORD 0
  311. profileHeader             ds        CM2Header        ; offset: $0 (0)
  312. calibrationDate             ds        CMDateTime        ; offset: $80 (128)
  313. ASCIIProfileDescriptionLen  ds.l 1                ; offset: $8C (140)
  314. ASCIIProfileDescription     ds.b    1                ; offset: $90 (144) <-- really an array of length one ;  variable length 
  315.                          ORG 146
  316. sizeof                     EQU *                    ; size:   $92 (146)
  317.                         ENDR
  318. ; typedef struct CMProfileIdentifier *    CMProfileIdentifierPtr
  319.  
  320. ;  packing formats 
  321.  
  322. cmNoColorPacking                EQU        $0000
  323. cmAlphaSpace                    EQU        $0080
  324. cmWord5ColorPacking                EQU        $0500
  325. cmLong8ColorPacking                EQU        $0800
  326. cmLong10ColorPacking            EQU        $0A00
  327. cmAlphaFirstPacking                EQU        $1000
  328. cmOneBitDirectPacking            EQU        $0B00
  329. cmAlphaLastPacking                EQU        $0000
  330. cm24_8ColorPacking                EQU        $2100
  331. cm32_8ColorPacking                EQU        $0800
  332. cm40_8ColorPacking                EQU        $2200
  333. cm48_8ColorPacking                EQU        $2300
  334. cm56_8ColorPacking                EQU        $2400
  335. cm64_8ColorPacking                EQU        $2500
  336. cm32_16ColorPacking                EQU        $2600
  337. cm32_32ColorPacking                EQU        $2700
  338. ;  general colorspaces 
  339.  
  340. cmNoSpace                        EQU        0
  341. cmRGBSpace                        EQU        1
  342. cmCMYKSpace                        EQU        2
  343. cmHSVSpace                        EQU        3
  344. cmHLSSpace                        EQU        4
  345. cmYXYSpace                        EQU        5
  346. cmXYZSpace                        EQU        6
  347. cmLUVSpace                        EQU        7
  348. cmLABSpace                        EQU        8
  349. cmReservedSpace1                EQU        9
  350. cmGraySpace                        EQU        10
  351. cmReservedSpace2                EQU        11
  352. cmGamutResultSpace                EQU        12
  353. cmNamedIndexedSpace                EQU        16
  354. cmMCFiveSpace                    EQU        17
  355. cmMCSixSpace                    EQU        18
  356. cmMCSevenSpace                    EQU        19
  357. cmMCEightSpace                    EQU        20
  358. ;  supported CMBitmapColorSpaces - each of the following is a 
  359. ;  combination of a general colospace and a packing formats 
  360.  
  361. cmRGBASpace                        EQU        129
  362. cmGrayASpace                    EQU        138
  363. cmRGB16Space                    EQU        $0501
  364. cmRGB32Space                    EQU        $0801
  365. cmARGB32Space                    EQU        $1881
  366. cmCMYK32Space                    EQU        $0802
  367. cmHSV32Space                    EQU        $0A03
  368. cmHLS32Space                    EQU        $0A04
  369. cmYXY32Space                    EQU        $0A05
  370. cmXYZ32Space                    EQU        $0A06
  371. cmLUV32Space                    EQU        $0A07
  372. cmLAB32Space                    EQU        $0A08
  373. cmGamutResult1Space                EQU        $0B0C
  374. cmRGB24Space                    EQU        $2101
  375. cmRGBA32Space                    EQU        $0881
  376. cmLAB24Space                    EQU        $2108
  377. cmNamedIndexed32Space            EQU        $2710
  378. cmMCFive8Space                    EQU        $2211
  379. cmMCSix8Space                    EQU        $2312
  380. cmMCSeven8Space                    EQU        $2413
  381. cmMCEight8Space                    EQU        $2514
  382. ; typedef unsigned long                 CMBitmapColorSpace
  383.  
  384. CMBitmap                RECORD 0
  385. image                     ds.l    1                ; offset: $0 (0)
  386. width                     ds.l    1                ; offset: $4 (4)
  387. height                     ds.l    1                ; offset: $8 (8)
  388. rowBytes                 ds.l    1                ; offset: $C (12)
  389. pixelSize                 ds.l    1                ; offset: $10 (16)
  390. space                     ds.l    1                ; offset: $14 (20)
  391. user1                     ds.l    1                ; offset: $18 (24)
  392. user2                     ds.l    1                ; offset: $1C (28)
  393. sizeof                     EQU *                    ; size:   $20 (32)
  394.                         ENDR
  395. ;  Classic Print Manager Stuff 
  396.  
  397. enableColorMatchingOp            EQU        12
  398. registerProfileOp                EQU        13
  399.  
  400. cmNoProfileBase                    EQU        0
  401. cmFileBasedProfile                EQU        1
  402. cmHandleBasedProfile            EQU        2
  403. cmPtrBasedProfile                EQU        3
  404. cmProcedureBasedProfile            EQU        4
  405. CMFileLocation            RECORD 0
  406. spec                     ds        FSSpec            ; offset: $0 (0)
  407. sizeof                     EQU *                    ; size:   $46 (70)
  408.                         ENDR
  409. CMHandleLocation        RECORD 0
  410. h                         ds.l    1                ; offset: $0 (0)
  411. sizeof                     EQU *                    ; size:   $4 (4)
  412.                         ENDR
  413. CMPtrLocation            RECORD 0
  414. p                         ds.l    1                ; offset: $0 (0)
  415. sizeof                     EQU *                    ; size:   $4 (4)
  416.                         ENDR
  417. CMProcedureLocation        RECORD 0
  418. proc                     ds.l    1                ; offset: $0 (0)
  419. refCon                     ds.l    1                ; offset: $4 (4)
  420. sizeof                     EQU *                    ; size:   $8 (8)
  421.                         ENDR
  422. CMProfLoc                RECORD 0
  423. fileLoc                     ds        CMFileLocation ; offset: $0 (0)
  424.                          ORG 0
  425. handleLoc                 ds        CMHandleLocation ; offset: $0 (0)
  426.                          ORG 0
  427. ptrLoc                     ds        CMPtrLocation    ; offset: $0 (0)
  428.                          ORG 0
  429. procLoc                     ds        CMProcedureLocation ; offset: $0 (0)
  430.                          ORG 70
  431. sizeof                     EQU *                    ; size:   $46 (70)
  432.                         ENDR
  433. CMProfileLocation        RECORD 0
  434. locType                     ds.w    1                ; offset: $0 (0)
  435. u                         ds        CMProfLoc        ; offset: $2 (2)
  436. sizeof                     EQU *                    ; size:   $48 (72)
  437.                         ENDR
  438. ;  Profile file and element access 
  439. ;
  440. ; pascal CMError CMNewProfile(CMProfileRef *prof, const CMProfileLocation *theProfile)
  441. ;
  442.     IF ¬ GENERATINGCFM THEN
  443.         Macro
  444.         _CMNewProfile
  445.             dc.w                $203C
  446.             dc.w                $0008
  447.             dc.w                $001B
  448.             dc.w                $ABEE
  449.         EndM
  450.     ELSE
  451.         IMPORT_CFM_FUNCTION CMNewProfile
  452.     ENDIF
  453.  
  454. ;
  455. ; pascal CMError CMOpenProfile(CMProfileRef *prof, const CMProfileLocation *theProfile)
  456. ;
  457.     IF ¬ GENERATINGCFM THEN
  458.         Macro
  459.         _CMOpenProfile
  460.             dc.w                $203C
  461.             dc.w                $0008
  462.             dc.w                $001C
  463.             dc.w                $ABEE
  464.         EndM
  465.     ELSE
  466.         IMPORT_CFM_FUNCTION CMOpenProfile
  467.     ENDIF
  468.  
  469. ;
  470. ; pascal CMError CMCloseProfile(CMProfileRef prof)
  471. ;
  472.     IF ¬ GENERATINGCFM THEN
  473.         Macro
  474.         _CMCloseProfile
  475.             dc.w                $203C
  476.             dc.w                $0004
  477.             dc.w                $001D
  478.             dc.w                $ABEE
  479.         EndM
  480.     ELSE
  481.         IMPORT_CFM_FUNCTION CMCloseProfile
  482.     ENDIF
  483.  
  484. ;
  485. ; pascal CMError CMUpdateProfile(CMProfileRef prof)
  486. ;
  487.     IF ¬ GENERATINGCFM THEN
  488.         Macro
  489.         _CMUpdateProfile
  490.             dc.w                $203C
  491.             dc.w                $0004
  492.             dc.w                $0034
  493.             dc.w                $ABEE
  494.         EndM
  495.     ELSE
  496.         IMPORT_CFM_FUNCTION CMUpdateProfile
  497.     ENDIF
  498.  
  499. ;
  500. ; pascal CMError CMCopyProfile(CMProfileRef *targetProf, const CMProfileLocation *targetLocation, CMProfileRef srcProf)
  501. ;
  502.     IF ¬ GENERATINGCFM THEN
  503.         Macro
  504.         _CMCopyProfile
  505.             dc.w                $203C
  506.             dc.w                $000C
  507.             dc.w                $0025
  508.             dc.w                $ABEE
  509.         EndM
  510.     ELSE
  511.         IMPORT_CFM_FUNCTION CMCopyProfile
  512.     ENDIF
  513.  
  514. ;
  515. ; pascal CMError CMValidateProfile(CMProfileRef prof, Boolean *valid, Boolean *preferredCMMnotfound)
  516. ;
  517.     IF ¬ GENERATINGCFM THEN
  518.         Macro
  519.         _CMValidateProfile
  520.             dc.w                $203C
  521.             dc.w                $000C
  522.             dc.w                $0026
  523.             dc.w                $ABEE
  524.         EndM
  525.     ELSE
  526.         IMPORT_CFM_FUNCTION CMValidateProfile
  527.     ENDIF
  528.  
  529. ;
  530. ; pascal CMError CMGetProfileLocation(CMProfileRef prof, CMProfileLocation *theProfile)
  531. ;
  532.     IF ¬ GENERATINGCFM THEN
  533.         Macro
  534.         _CMGetProfileLocation
  535.             dc.w                $203C
  536.             dc.w                $0008
  537.             dc.w                $003C
  538.             dc.w                $ABEE
  539.         EndM
  540.     ELSE
  541.         IMPORT_CFM_FUNCTION CMGetProfileLocation
  542.     ENDIF
  543.  
  544. ;
  545. ; pascal CMError CMFlattenProfile(CMProfileRef prof, unsigned long flags, CMFlattenUPP proc, void *refCon, Boolean *preferredCMMnotfound)
  546. ;
  547.     IF ¬ GENERATINGCFM THEN
  548.         Macro
  549.         _CMFlattenProfile
  550.             dc.w                $203C
  551.             dc.w                $0014
  552.             dc.w                $0031
  553.             dc.w                $ABEE
  554.         EndM
  555.     ELSE
  556.         IMPORT_CFM_FUNCTION CMFlattenProfile
  557.     ENDIF
  558.  
  559. ;
  560. ; pascal CMError CMUnflattenProfile(FSSpec *resultFileSpec, CMFlattenUPP proc, void *refCon, Boolean *preferredCMMnotfound)
  561. ;
  562.     IF ¬ GENERATINGCFM THEN
  563.         Macro
  564.         _CMUnflattenProfile
  565.             dc.w                $203C
  566.             dc.w                $0010
  567.             dc.w                $0032
  568.             dc.w                $ABEE
  569.         EndM
  570.     ELSE
  571.         IMPORT_CFM_FUNCTION CMUnflattenProfile
  572.     ENDIF
  573.  
  574. ;
  575. ; pascal CMError CMGetProfileHeader(CMProfileRef prof, CMAppleProfileHeader *header)
  576. ;
  577.     IF ¬ GENERATINGCFM THEN
  578.         Macro
  579.         _CMGetProfileHeader
  580.             dc.w                $203C
  581.             dc.w                $0008
  582.             dc.w                $0039
  583.             dc.w                $ABEE
  584.         EndM
  585.     ELSE
  586.         IMPORT_CFM_FUNCTION CMGetProfileHeader
  587.     ENDIF
  588.  
  589. ;
  590. ; pascal CMError CMSetProfileHeader(CMProfileRef prof, const CMAppleProfileHeader *header)
  591. ;
  592.     IF ¬ GENERATINGCFM THEN
  593.         Macro
  594.         _CMSetProfileHeader
  595.             dc.w                $203C
  596.             dc.w                $0008
  597.             dc.w                $003A
  598.             dc.w                $ABEE
  599.         EndM
  600.     ELSE
  601.         IMPORT_CFM_FUNCTION CMSetProfileHeader
  602.     ENDIF
  603.  
  604. ;
  605. ; pascal CMError CMProfileElementExists(CMProfileRef prof, OSType tag, Boolean *found)
  606. ;
  607.     IF ¬ GENERATINGCFM THEN
  608.         Macro
  609.         _CMProfileElementExists
  610.             dc.w                $203C
  611.             dc.w                $000C
  612.             dc.w                $001E
  613.             dc.w                $ABEE
  614.         EndM
  615.     ELSE
  616.         IMPORT_CFM_FUNCTION CMProfileElementExists
  617.     ENDIF
  618.  
  619. ;
  620. ; pascal CMError CMCountProfileElements(CMProfileRef prof, unsigned long *elementCount)
  621. ;
  622.     IF ¬ GENERATINGCFM THEN
  623.         Macro
  624.         _CMCountProfileElements
  625.             dc.w                $203C
  626.             dc.w                $0008
  627.             dc.w                $001F
  628.             dc.w                $ABEE
  629.         EndM
  630.     ELSE
  631.         IMPORT_CFM_FUNCTION CMCountProfileElements
  632.     ENDIF
  633.  
  634. ;
  635. ; pascal CMError CMGetProfileElement(CMProfileRef prof, OSType tag, unsigned long *elementSize, void *elementData)
  636. ;
  637.     IF ¬ GENERATINGCFM THEN
  638.         Macro
  639.         _CMGetProfileElement
  640.             dc.w                $203C
  641.             dc.w                $0010
  642.             dc.w                $0020
  643.             dc.w                $ABEE
  644.         EndM
  645.     ELSE
  646.         IMPORT_CFM_FUNCTION CMGetProfileElement
  647.     ENDIF
  648.  
  649. ;
  650. ; pascal CMError CMSetProfileElement(CMProfileRef prof, OSType tag, unsigned long elementSize, void *elementData)
  651. ;
  652.     IF ¬ GENERATINGCFM THEN
  653.         Macro
  654.         _CMSetProfileElement
  655.             dc.w                $203C
  656.             dc.w                $0010
  657.             dc.w                $0023
  658.             dc.w                $ABEE
  659.         EndM
  660.     ELSE
  661.         IMPORT_CFM_FUNCTION CMSetProfileElement
  662.     ENDIF
  663.  
  664. ;
  665. ; pascal CMError CMSetProfileElementSize(CMProfileRef prof, OSType tag, unsigned long elementSize)
  666. ;
  667.     IF ¬ GENERATINGCFM THEN
  668.         Macro
  669.         _CMSetProfileElementSize
  670.             dc.w                $203C
  671.             dc.w                $000C
  672.             dc.w                $0038
  673.             dc.w                $ABEE
  674.         EndM
  675.     ELSE
  676.         IMPORT_CFM_FUNCTION CMSetProfileElementSize
  677.     ENDIF
  678.  
  679. ;
  680. ; pascal CMError CMSetProfileElementReference(CMProfileRef prof, OSType elementTag, OSType referenceTag)
  681. ;
  682.     IF ¬ GENERATINGCFM THEN
  683.         Macro
  684.         _CMSetProfileElementReference
  685.             dc.w                $203C
  686.             dc.w                $000C
  687.             dc.w                $0035
  688.             dc.w                $ABEE
  689.         EndM
  690.     ELSE
  691.         IMPORT_CFM_FUNCTION CMSetProfileElementReference
  692.     ENDIF
  693.  
  694. ;
  695. ; pascal CMError CMGetPartialProfileElement(CMProfileRef prof, OSType tag, unsigned long offset, unsigned long *byteCount, void *elementData)
  696. ;
  697.     IF ¬ GENERATINGCFM THEN
  698.         Macro
  699.         _CMGetPartialProfileElement
  700.             dc.w                $203C
  701.             dc.w                $0014
  702.             dc.w                $0036
  703.             dc.w                $ABEE
  704.         EndM
  705.     ELSE
  706.         IMPORT_CFM_FUNCTION CMGetPartialProfileElement
  707.     ENDIF
  708.  
  709. ;
  710. ; pascal CMError CMSetPartialProfileElement(CMProfileRef prof, OSType tag, unsigned long offset, unsigned long byteCount, void *elementData)
  711. ;
  712.     IF ¬ GENERATINGCFM THEN
  713.         Macro
  714.         _CMSetPartialProfileElement
  715.             dc.w                $203C
  716.             dc.w                $0014
  717.             dc.w                $0037
  718.             dc.w                $ABEE
  719.         EndM
  720.     ELSE
  721.         IMPORT_CFM_FUNCTION CMSetPartialProfileElement
  722.     ENDIF
  723.  
  724. ;
  725. ; pascal CMError CMGetIndProfileElementInfo(CMProfileRef prof, unsigned long index, OSType *tag, unsigned long *elementSize, Boolean *refs)
  726. ;
  727.     IF ¬ GENERATINGCFM THEN
  728.         Macro
  729.         _CMGetIndProfileElementInfo
  730.             dc.w                $203C
  731.             dc.w                $0014
  732.             dc.w                $0021
  733.             dc.w                $ABEE
  734.         EndM
  735.     ELSE
  736.         IMPORT_CFM_FUNCTION CMGetIndProfileElementInfo
  737.     ENDIF
  738.  
  739. ;
  740. ; pascal CMError CMGetIndProfileElement(CMProfileRef prof, unsigned long index, unsigned long *elementSize, void *elementData)
  741. ;
  742.     IF ¬ GENERATINGCFM THEN
  743.         Macro
  744.         _CMGetIndProfileElement
  745.             dc.w                $203C
  746.             dc.w                $0010
  747.             dc.w                $0022
  748.             dc.w                $ABEE
  749.         EndM
  750.     ELSE
  751.         IMPORT_CFM_FUNCTION CMGetIndProfileElement
  752.     ENDIF
  753.  
  754. ;
  755. ; pascal CMError CMRemoveProfileElement(CMProfileRef prof, OSType tag)
  756. ;
  757.     IF ¬ GENERATINGCFM THEN
  758.         Macro
  759.         _CMRemoveProfileElement
  760.             dc.w                $203C
  761.             dc.w                $0008
  762.             dc.w                $0024
  763.             dc.w                $ABEE
  764.         EndM
  765.     ELSE
  766.         IMPORT_CFM_FUNCTION CMRemoveProfileElement
  767.     ENDIF
  768.  
  769. ;
  770. ; pascal CMError CMGetScriptProfileDescription(CMProfileRef prof, Str255 name, ScriptCode *code)
  771. ;
  772.     IF ¬ GENERATINGCFM THEN
  773.         Macro
  774.         _CMGetScriptProfileDescription
  775.             dc.w                $203C
  776.             dc.w                $000C
  777.             dc.w                $003E
  778.             dc.w                $ABEE
  779.         EndM
  780.     ELSE
  781.         IMPORT_CFM_FUNCTION CMGetScriptProfileDescription
  782.     ENDIF
  783.  
  784. ;
  785. ; pascal CMError CMCloneProfileRef(CMProfileRef prof)
  786. ;
  787.     IF ¬ GENERATINGCFM THEN
  788.         Macro
  789.         _CMCloneProfileRef
  790.             dc.w                $203C
  791.             dc.w                $0004
  792.             dc.w                $0042
  793.             dc.w                $ABEE
  794.         EndM
  795.     ELSE
  796.         IMPORT_CFM_FUNCTION CMCloneProfileRef
  797.     ENDIF
  798.  
  799. ;
  800. ; pascal CMError CMGetProfileRefCount(CMProfileRef prof, long *count)
  801. ;
  802.     IF ¬ GENERATINGCFM THEN
  803.         Macro
  804.         _CMGetProfileRefCount
  805.             dc.w                $203C
  806.             dc.w                $0008
  807.             dc.w                $0043
  808.             dc.w                $ABEE
  809.         EndM
  810.     ELSE
  811.         IMPORT_CFM_FUNCTION CMGetProfileRefCount
  812.     ENDIF
  813.  
  814. ;
  815. ; pascal CMError CMProfileModified(CMProfileRef prof, Boolean *modified)
  816. ;
  817.     IF ¬ GENERATINGCFM THEN
  818.         Macro
  819.         _CMProfileModified
  820.             dc.w                $203C
  821.             dc.w                $0008
  822.             dc.w                $0044
  823.             dc.w                $ABEE
  824.         EndM
  825.     ELSE
  826.         IMPORT_CFM_FUNCTION CMProfileModified
  827.     ENDIF
  828.  
  829. ;  named Color access functions 
  830. ;
  831. ; pascal CMError CMGetNamedColorInfo(CMProfileRef prof, unsigned long *deviceChannels, OSType *deviceColorSpace, OSType *PCSColorSpace, unsigned long *count, StringPtr prefix, StringPtr suffix)
  832. ;
  833.     IF ¬ GENERATINGCFM THEN
  834.         Macro
  835.         _CMGetNamedColorInfo
  836.             dc.w                $203C
  837.             dc.w                $001C
  838.             dc.w                $0046
  839.             dc.w                $ABEE
  840.         EndM
  841.     ELSE
  842.         IMPORT_CFM_FUNCTION CMGetNamedColorInfo
  843.     ENDIF
  844.  
  845. ;
  846. ; pascal CMError CMGetNamedColorValue(CMProfileRef prof, StringPtr name, CMColor *deviceColor, CMColor *PCSColor)
  847. ;
  848.     IF ¬ GENERATINGCFM THEN
  849.         Macro
  850.         _CMGetNamedColorValue
  851.             dc.w                $203C
  852.             dc.w                $0010
  853.             dc.w                $0047
  854.             dc.w                $ABEE
  855.         EndM
  856.     ELSE
  857.         IMPORT_CFM_FUNCTION CMGetNamedColorValue
  858.     ENDIF
  859.  
  860. ;
  861. ; pascal CMError CMGetIndNamedColorValue(CMProfileRef prof, unsigned long index, CMColor *deviceColor, CMColor *PCSColor)
  862. ;
  863.     IF ¬ GENERATINGCFM THEN
  864.         Macro
  865.         _CMGetIndNamedColorValue
  866.             dc.w                $203C
  867.             dc.w                $0010
  868.             dc.w                $0048
  869.             dc.w                $ABEE
  870.         EndM
  871.     ELSE
  872.         IMPORT_CFM_FUNCTION CMGetIndNamedColorValue
  873.     ENDIF
  874.  
  875. ;
  876. ; pascal CMError CMGetNamedColorIndex(CMProfileRef prof, StringPtr name, unsigned long *index)
  877. ;
  878.     IF ¬ GENERATINGCFM THEN
  879.         Macro
  880.         _CMGetNamedColorIndex
  881.             dc.w                $203C
  882.             dc.w                $000C
  883.             dc.w                $0049
  884.             dc.w                $ABEE
  885.         EndM
  886.     ELSE
  887.         IMPORT_CFM_FUNCTION CMGetNamedColorIndex
  888.     ENDIF
  889.  
  890. ;
  891. ; pascal CMError CMGetNamedColorName(CMProfileRef prof, unsigned long index, StringPtr name)
  892. ;
  893.     IF ¬ GENERATINGCFM THEN
  894.         Macro
  895.         _CMGetNamedColorName
  896.             dc.w                $203C
  897.             dc.w                $000C
  898.             dc.w                $004A
  899.             dc.w                $ABEE
  900.         EndM
  901.     ELSE
  902.         IMPORT_CFM_FUNCTION CMGetNamedColorName
  903.     ENDIF
  904.  
  905. ;  Low-level matching functions 
  906. ;
  907. ; pascal CMError NCWNewColorWorld(CMWorldRef *cw, CMProfileRef src, CMProfileRef dst)
  908. ;
  909.     IF ¬ GENERATINGCFM THEN
  910.         Macro
  911.         _NCWNewColorWorld
  912.             dc.w                $203C
  913.             dc.w                $000C
  914.             dc.w                $0014
  915.             dc.w                $ABEE
  916.         EndM
  917.     ELSE
  918.         IMPORT_CFM_FUNCTION NCWNewColorWorld
  919.     ENDIF
  920.  
  921. ;
  922. ; pascal CMError CWConcatColorWorld(CMWorldRef *cw, CMConcatProfileSet *profileSet)
  923. ;
  924.     IF ¬ GENERATINGCFM THEN
  925.         Macro
  926.         _CWConcatColorWorld
  927.             dc.w                $203C
  928.             dc.w                $0008
  929.             dc.w                $0015
  930.             dc.w                $ABEE
  931.         EndM
  932.     ELSE
  933.         IMPORT_CFM_FUNCTION CWConcatColorWorld
  934.     ENDIF
  935.  
  936. ;
  937. ; pascal CMError CWNewLinkProfile(CMProfileRef *prof, const CMProfileLocation *targetLocation, CMConcatProfileSet *profileSet)
  938. ;
  939.     IF ¬ GENERATINGCFM THEN
  940.         Macro
  941.         _CWNewLinkProfile
  942.             dc.w                $203C
  943.             dc.w                $000C
  944.             dc.w                $0033
  945.             dc.w                $ABEE
  946.         EndM
  947.     ELSE
  948.         IMPORT_CFM_FUNCTION CWNewLinkProfile
  949.     ENDIF
  950.  
  951. ;
  952. ; pascal void CWDisposeColorWorld(CMWorldRef cw)
  953. ;
  954.     IF ¬ GENERATINGCFM THEN
  955.         Macro
  956.         _CWDisposeColorWorld
  957.             dc.w                $203C
  958.             dc.w                $0004
  959.             dc.w                $0001
  960.             dc.w                $ABEE
  961.         EndM
  962.     ELSE
  963.         IMPORT_CFM_FUNCTION CWDisposeColorWorld
  964.     ENDIF
  965.  
  966. ;
  967. ; pascal CMError CWMatchColors(CMWorldRef cw, CMColor *myColors, unsigned long count)
  968. ;
  969.     IF ¬ GENERATINGCFM THEN
  970.         Macro
  971.         _CWMatchColors
  972.             dc.w                $203C
  973.             dc.w                $000C
  974.             dc.w                $0002
  975.             dc.w                $ABEE
  976.         EndM
  977.     ELSE
  978.         IMPORT_CFM_FUNCTION CWMatchColors
  979.     ENDIF
  980.  
  981. ;
  982. ; pascal CMError CWCheckColors(CMWorldRef cw, CMColor *myColors, unsigned long count, long *result)
  983. ;
  984.     IF ¬ GENERATINGCFM THEN
  985.         Macro
  986.         _CWCheckColors
  987.             dc.w                $203C
  988.             dc.w                $0010
  989.             dc.w                $0003
  990.             dc.w                $ABEE
  991.         EndM
  992.     ELSE
  993.         IMPORT_CFM_FUNCTION CWCheckColors
  994.     ENDIF
  995.  
  996. ;  Bitmap matching 
  997. ;
  998. ; pascal CMError CWMatchBitmap(CMWorldRef cw, CMBitmap *bitmap, CMBitmapCallBackUPP progressProc, void *refCon, CMBitmap *matchedBitmap)
  999. ;
  1000.     IF ¬ GENERATINGCFM THEN
  1001.         Macro
  1002.         _CWMatchBitmap
  1003.             dc.w                $203C
  1004.             dc.w                $0010
  1005.             dc.w                $002C
  1006.             dc.w                $ABEE
  1007.         EndM
  1008.     ELSE
  1009.         IMPORT_CFM_FUNCTION CWMatchBitmap
  1010.     ENDIF
  1011.  
  1012. ;
  1013. ; pascal CMError CWCheckBitmap(CMWorldRef cw, const CMBitmap *bitmap, CMBitmapCallBackUPP progressProc, void *refCon, CMBitmap *resultBitmap)
  1014. ;
  1015.     IF ¬ GENERATINGCFM THEN
  1016.         Macro
  1017.         _CWCheckBitmap
  1018.             dc.w                $203C
  1019.             dc.w                $0014
  1020.             dc.w                $002D
  1021.             dc.w                $ABEE
  1022.         EndM
  1023.     ELSE
  1024.         IMPORT_CFM_FUNCTION CWCheckBitmap
  1025.     ENDIF
  1026.  
  1027. ;  Quickdraw-specific matching 
  1028. ;
  1029. ; pascal CMError CWMatchPixMap(CMWorldRef cw, PixMap *myPixMap, CMBitmapCallBackUPP progressProc, void *refCon)
  1030. ;
  1031.     IF ¬ GENERATINGCFM THEN
  1032.         Macro
  1033.         _CWMatchPixMap
  1034.             dc.w                $203C
  1035.             dc.w                $0010
  1036.             dc.w                $0004
  1037.             dc.w                $ABEE
  1038.         EndM
  1039.     ELSE
  1040.         IMPORT_CFM_FUNCTION CWMatchPixMap
  1041.     ENDIF
  1042.  
  1043. ;
  1044. ; pascal CMError CWCheckPixMap(CMWorldRef cw, PixMap *myPixMap, CMBitmapCallBackUPP progressProc, void *refCon, BitMap *resultBitMap)
  1045. ;
  1046.     IF ¬ GENERATINGCFM THEN
  1047.         Macro
  1048.         _CWCheckPixMap
  1049.             dc.w                $203C
  1050.             dc.w                $0014
  1051.             dc.w                $0007
  1052.             dc.w                $ABEE
  1053.         EndM
  1054.     ELSE
  1055.         IMPORT_CFM_FUNCTION CWCheckPixMap
  1056.     ENDIF
  1057.  
  1058. ;
  1059. ; pascal CMError NCMBeginMatching(CMProfileRef src, CMProfileRef dst, CMMatchRef *myRef)
  1060. ;
  1061.     IF ¬ GENERATINGCFM THEN
  1062.         Macro
  1063.         _NCMBeginMatching
  1064.             dc.w                $203C
  1065.             dc.w                $000C
  1066.             dc.w                $0016
  1067.             dc.w                $ABEE
  1068.         EndM
  1069.     ELSE
  1070.         IMPORT_CFM_FUNCTION NCMBeginMatching
  1071.     ENDIF
  1072.  
  1073. ;
  1074. ; pascal void CMEndMatching(CMMatchRef myRef)
  1075. ;
  1076.     IF ¬ GENERATINGCFM THEN
  1077.         Macro
  1078.         _CMEndMatching
  1079.             dc.w                $203C
  1080.             dc.w                $0004
  1081.             dc.w                $000B
  1082.             dc.w                $ABEE
  1083.         EndM
  1084.     ELSE
  1085.         IMPORT_CFM_FUNCTION CMEndMatching
  1086.     ENDIF
  1087.  
  1088. ;
  1089. ; pascal void NCMDrawMatchedPicture(PicHandle myPicture, CMProfileRef dst, Rect *myRect)
  1090. ;
  1091.     IF ¬ GENERATINGCFM THEN
  1092.         Macro
  1093.         _NCMDrawMatchedPicture
  1094.             dc.w                $203C
  1095.             dc.w                $000C
  1096.             dc.w                $0017
  1097.             dc.w                $ABEE
  1098.         EndM
  1099.     ELSE
  1100.         IMPORT_CFM_FUNCTION NCMDrawMatchedPicture
  1101.     ENDIF
  1102.  
  1103. ;
  1104. ; pascal void CMEnableMatchingComment(Boolean enableIt)
  1105. ;
  1106.     IF ¬ GENERATINGCFM THEN
  1107.         Macro
  1108.         _CMEnableMatchingComment
  1109.             dc.w                $203C
  1110.             dc.w                $0002
  1111.             dc.w                $000D
  1112.             dc.w                $ABEE
  1113.         EndM
  1114.     ELSE
  1115.         IMPORT_CFM_FUNCTION CMEnableMatchingComment
  1116.     ENDIF
  1117.  
  1118. ;
  1119. ; pascal CMError NCMUseProfileComment(CMProfileRef prof, unsigned long flags)
  1120. ;
  1121.     IF ¬ GENERATINGCFM THEN
  1122.         Macro
  1123.         _NCMUseProfileComment
  1124.             dc.w                $203C
  1125.             dc.w                $0008
  1126.             dc.w                $003B
  1127.             dc.w                $ABEE
  1128.         EndM
  1129.     ELSE
  1130.         IMPORT_CFM_FUNCTION NCMUseProfileComment
  1131.     ENDIF
  1132.  
  1133. ;
  1134. ; pascal CMError CMCreateProfileIdentifier(CMProfileRef prof, CMProfileIdentifierPtr ident, unsigned long *size)
  1135. ;
  1136.     IF ¬ GENERATINGCFM THEN
  1137.         Macro
  1138.         _CMCreateProfileIdentifier
  1139.             dc.w                $203C
  1140.             dc.w                $000C
  1141.             dc.w                $0041
  1142.             dc.w                $ABEE
  1143.         EndM
  1144.     ELSE
  1145.         IMPORT_CFM_FUNCTION CMCreateProfileIdentifier
  1146.     ENDIF
  1147.  
  1148. ;  System Profile access 
  1149. ;
  1150. ; pascal CMError CMGetSystemProfile(CMProfileRef *prof)
  1151. ;
  1152.     IF ¬ GENERATINGCFM THEN
  1153.         Macro
  1154.         _CMGetSystemProfile
  1155.             dc.w                $203C
  1156.             dc.w                $0004
  1157.             dc.w                $0018
  1158.             dc.w                $ABEE
  1159.         EndM
  1160.     ELSE
  1161.         IMPORT_CFM_FUNCTION CMGetSystemProfile
  1162.     ENDIF
  1163.  
  1164. ;
  1165. ; pascal CMError CMSetSystemProfile(const FSSpec *profileFileSpec)
  1166. ;
  1167.     IF ¬ GENERATINGCFM THEN
  1168.         Macro
  1169.         _CMSetSystemProfile
  1170.             dc.w                $203C
  1171.             dc.w                $0004
  1172.             dc.w                $0019
  1173.             dc.w                $ABEE
  1174.         EndM
  1175.     ELSE
  1176.         IMPORT_CFM_FUNCTION CMSetSystemProfile
  1177.     ENDIF
  1178.  
  1179. ;  External Profile Management 
  1180. ;
  1181. ; pascal CMError CMNewProfileSearch(CMSearchRecord *searchSpec, void *refCon, unsigned long *count, CMProfileSearchRef *searchResult)
  1182. ;
  1183.     IF ¬ GENERATINGCFM THEN
  1184.         Macro
  1185.         _CMNewProfileSearch
  1186.             dc.w                $203C
  1187.             dc.w                $0010
  1188.             dc.w                $0027
  1189.             dc.w                $ABEE
  1190.         EndM
  1191.     ELSE
  1192.         IMPORT_CFM_FUNCTION CMNewProfileSearch
  1193.     ENDIF
  1194.  
  1195. ;
  1196. ; pascal CMError CMUpdateProfileSearch(CMProfileSearchRef search, void *refCon, unsigned long *count)
  1197. ;
  1198.     IF ¬ GENERATINGCFM THEN
  1199.         Macro
  1200.         _CMUpdateProfileSearch
  1201.             dc.w                $203C
  1202.             dc.w                $000C
  1203.             dc.w                $0028
  1204.             dc.w                $ABEE
  1205.         EndM
  1206.     ELSE
  1207.         IMPORT_CFM_FUNCTION CMUpdateProfileSearch
  1208.     ENDIF
  1209.  
  1210. ;
  1211. ; pascal void CMDisposeProfileSearch(CMProfileSearchRef search)
  1212. ;
  1213.     IF ¬ GENERATINGCFM THEN
  1214.         Macro
  1215.         _CMDisposeProfileSearch
  1216.             dc.w                $203C
  1217.             dc.w                $0004
  1218.             dc.w                $0029
  1219.             dc.w                $ABEE
  1220.         EndM
  1221.     ELSE
  1222.         IMPORT_CFM_FUNCTION CMDisposeProfileSearch
  1223.     ENDIF
  1224.  
  1225. ;
  1226. ; pascal CMError CMSearchGetIndProfile(CMProfileSearchRef search, unsigned long index, CMProfileRef *prof)
  1227. ;
  1228.     IF ¬ GENERATINGCFM THEN
  1229.         Macro
  1230.         _CMSearchGetIndProfile
  1231.             dc.w                $203C
  1232.             dc.w                $000C
  1233.             dc.w                $002A
  1234.             dc.w                $ABEE
  1235.         EndM
  1236.     ELSE
  1237.         IMPORT_CFM_FUNCTION CMSearchGetIndProfile
  1238.     ENDIF
  1239.  
  1240. ;
  1241. ; pascal CMError CMSearchGetIndProfileFileSpec(CMProfileSearchRef search, unsigned long index, FSSpec *profileFile)
  1242. ;
  1243.     IF ¬ GENERATINGCFM THEN
  1244.         Macro
  1245.         _CMSearchGetIndProfileFileSpec
  1246.             dc.w                $203C
  1247.             dc.w                $000C
  1248.             dc.w                $002B
  1249.             dc.w                $ABEE
  1250.         EndM
  1251.     ELSE
  1252.         IMPORT_CFM_FUNCTION CMSearchGetIndProfileFileSpec
  1253.     ENDIF
  1254.  
  1255. ;
  1256. ; pascal CMError CMProfileIdentifierFolderSearch(CMProfileIdentifierPtr ident, unsigned long *matchedCount, CMProfileSearchRef *searchResult)
  1257. ;
  1258.     IF ¬ GENERATINGCFM THEN
  1259.         Macro
  1260.         _CMProfileIdentifierFolderSearch
  1261.             dc.w                $203C
  1262.             dc.w                $000C
  1263.             dc.w                $003F
  1264.             dc.w                $ABEE
  1265.         EndM
  1266.     ELSE
  1267.         IMPORT_CFM_FUNCTION CMProfileIdentifierFolderSearch
  1268.     ENDIF
  1269.  
  1270. ;
  1271. ; pascal CMError CMProfileIdentifierListSearch(CMProfileIdentifierPtr ident, CMProfileRef *profileList, unsigned long listSize, unsigned long *matchedCount, CMProfileRef *matchedList)
  1272. ;
  1273.     IF ¬ GENERATINGCFM THEN
  1274.         Macro
  1275.         _CMProfileIdentifierListSearch
  1276.             dc.w                $203C
  1277.             dc.w                $0014
  1278.             dc.w                $0040
  1279.             dc.w                $ABEE
  1280.         EndM
  1281.     ELSE
  1282.         IMPORT_CFM_FUNCTION CMProfileIdentifierListSearch
  1283.     ENDIF
  1284.  
  1285. ;  Utilities 
  1286. ;
  1287. ; pascal CMError CMGetColorSyncFolderSpec(short vRefNum, Boolean createFolder, short *foundVRefNum, long *foundDirID)
  1288. ;
  1289.     IF ¬ GENERATINGCFM THEN
  1290.         Macro
  1291.         _CMGetColorSyncFolderSpec
  1292.             dc.w                $203C
  1293.             dc.w                $000C
  1294.             dc.w                $0011
  1295.             dc.w                $ABEE
  1296.         EndM
  1297.     ELSE
  1298.         IMPORT_CFM_FUNCTION CMGetColorSyncFolderSpec
  1299.     ENDIF
  1300.  
  1301. ;
  1302. ; pascal CMError CMGetCWInfo(CMWorldRef cw, CMCWInfoRecord *info)
  1303. ;
  1304.     IF ¬ GENERATINGCFM THEN
  1305.         Macro
  1306.         _CMGetCWInfo
  1307.             dc.w                $203C
  1308.             dc.w                $0008
  1309.             dc.w                $001A
  1310.             dc.w                $ABEE
  1311.         EndM
  1312.     ELSE
  1313.         IMPORT_CFM_FUNCTION CMGetCWInfo
  1314.     ENDIF
  1315.  
  1316. ;
  1317. ; pascal CMError CMConvertProfile2to1(CMProfileRef profv2, CMProfileHandle *profv1)
  1318. ;
  1319.     IF ¬ GENERATINGCFM THEN
  1320.         Macro
  1321.         _CMConvertProfile2to1
  1322.             dc.w                $203C
  1323.             dc.w                $0008
  1324.             dc.w                $0045
  1325.             dc.w                $ABEE
  1326.         EndM
  1327.     ELSE
  1328.         IMPORT_CFM_FUNCTION CMConvertProfile2to1
  1329.     ENDIF
  1330.  
  1331. ;  ColorSpace conversion functions 
  1332. ;
  1333. ; pascal CMError CMConvertXYZToLab(const CMColor *src, const CMXYZColor *white, CMColor *dst, unsigned long count)
  1334. ;
  1335.     IF ¬ GENERATINGCFM THEN
  1336.         Macro
  1337.         _CMConvertXYZToLab
  1338.             dc.w                $203C
  1339.             dc.w                $0010
  1340.             dc.w                $004B
  1341.             dc.w                $ABEE
  1342.         EndM
  1343.     ELSE
  1344.         IMPORT_CFM_FUNCTION CMConvertXYZToLab
  1345.     ENDIF
  1346.  
  1347. ;
  1348. ; pascal CMError CMConvertLabToXYZ(const CMColor *src, const CMXYZColor *white, CMColor *dst, unsigned long count)
  1349. ;
  1350.     IF ¬ GENERATINGCFM THEN
  1351.         Macro
  1352.         _CMConvertLabToXYZ
  1353.             dc.w                $203C
  1354.             dc.w                $0010
  1355.             dc.w                $004C
  1356.             dc.w                $ABEE
  1357.         EndM
  1358.     ELSE
  1359.         IMPORT_CFM_FUNCTION CMConvertLabToXYZ
  1360.     ENDIF
  1361.  
  1362. ;
  1363. ; pascal CMError CMConvertXYZToLuv(const CMColor *src, const CMXYZColor *white, CMColor *dst, unsigned long count)
  1364. ;
  1365.     IF ¬ GENERATINGCFM THEN
  1366.         Macro
  1367.         _CMConvertXYZToLuv
  1368.             dc.w                $203C
  1369.             dc.w                $0010
  1370.             dc.w                $004D
  1371.             dc.w                $ABEE
  1372.         EndM
  1373.     ELSE
  1374.         IMPORT_CFM_FUNCTION CMConvertXYZToLuv
  1375.     ENDIF
  1376.  
  1377. ;
  1378. ; pascal CMError CMConvertLuvToXYZ(const CMColor *src, const CMXYZColor *white, CMColor *dst, unsigned long count)
  1379. ;
  1380.     IF ¬ GENERATINGCFM THEN
  1381.         Macro
  1382.         _CMConvertLuvToXYZ
  1383.             dc.w                $203C
  1384.             dc.w                $0010
  1385.             dc.w                $004E
  1386.             dc.w                $ABEE
  1387.         EndM
  1388.     ELSE
  1389.         IMPORT_CFM_FUNCTION CMConvertLuvToXYZ
  1390.     ENDIF
  1391.  
  1392. ;
  1393. ; pascal CMError CMConvertXYZToYxy(const CMColor *src, CMColor *dst, unsigned long count)
  1394. ;
  1395.     IF ¬ GENERATINGCFM THEN
  1396.         Macro
  1397.         _CMConvertXYZToYxy
  1398.             dc.w                $203C
  1399.             dc.w                $000C
  1400.             dc.w                $004F
  1401.             dc.w                $ABEE
  1402.         EndM
  1403.     ELSE
  1404.         IMPORT_CFM_FUNCTION CMConvertXYZToYxy
  1405.     ENDIF
  1406.  
  1407. ;
  1408. ; pascal CMError CMConvertYxyToXYZ(const CMColor *src, CMColor *dst, unsigned long count)
  1409. ;
  1410.     IF ¬ GENERATINGCFM THEN
  1411.         Macro
  1412.         _CMConvertYxyToXYZ
  1413.             dc.w                $203C
  1414.             dc.w                $000C
  1415.             dc.w                $0050
  1416.             dc.w                $ABEE
  1417.         EndM
  1418.     ELSE
  1419.         IMPORT_CFM_FUNCTION CMConvertYxyToXYZ
  1420.     ENDIF
  1421.  
  1422. ;
  1423. ; pascal CMError CMConvertRGBToHLS(const CMColor *src, CMColor *dst, unsigned long count)
  1424. ;
  1425.     IF ¬ GENERATINGCFM THEN
  1426.         Macro
  1427.         _CMConvertRGBToHLS
  1428.             dc.w                $203C
  1429.             dc.w                $000C
  1430.             dc.w                $0051
  1431.             dc.w                $ABEE
  1432.         EndM
  1433.     ELSE
  1434.         IMPORT_CFM_FUNCTION CMConvertRGBToHLS
  1435.     ENDIF
  1436.  
  1437. ;
  1438. ; pascal CMError CMConvertHLSToRGB(const CMColor *src, CMColor *dst, unsigned long count)
  1439. ;
  1440.     IF ¬ GENERATINGCFM THEN
  1441.         Macro
  1442.         _CMConvertHLSToRGB
  1443.             dc.w                $203C
  1444.             dc.w                $000C
  1445.             dc.w                $0052
  1446.             dc.w                $ABEE
  1447.         EndM
  1448.     ELSE
  1449.         IMPORT_CFM_FUNCTION CMConvertHLSToRGB
  1450.     ENDIF
  1451.  
  1452. ;
  1453. ; pascal CMError CMConvertRGBToHSV(const CMColor *src, CMColor *dst, unsigned long count)
  1454. ;
  1455.     IF ¬ GENERATINGCFM THEN
  1456.         Macro
  1457.         _CMConvertRGBToHSV
  1458.             dc.w                $203C
  1459.             dc.w                $000C
  1460.             dc.w                $0053
  1461.             dc.w                $ABEE
  1462.         EndM
  1463.     ELSE
  1464.         IMPORT_CFM_FUNCTION CMConvertRGBToHSV
  1465.     ENDIF
  1466.  
  1467. ;
  1468. ; pascal CMError CMConvertHSVToRGB(const CMColor *src, CMColor *dst, unsigned long count)
  1469. ;
  1470.     IF ¬ GENERATINGCFM THEN
  1471.         Macro
  1472.         _CMConvertHSVToRGB
  1473.             dc.w                $203C
  1474.             dc.w                $000C
  1475.             dc.w                $0054
  1476.             dc.w                $ABEE
  1477.         EndM
  1478.     ELSE
  1479.         IMPORT_CFM_FUNCTION CMConvertHSVToRGB
  1480.     ENDIF
  1481.  
  1482. ;
  1483. ; pascal CMError CMConvertRGBToGray(const CMColor *src, CMColor *dst, unsigned long count)
  1484. ;
  1485.     IF ¬ GENERATINGCFM THEN
  1486.         Macro
  1487.         _CMConvertRGBToGray
  1488.             dc.w                $203C
  1489.             dc.w                $000C
  1490.             dc.w                $0055
  1491.             dc.w                $ABEE
  1492.         EndM
  1493.     ELSE
  1494.         IMPORT_CFM_FUNCTION CMConvertRGBToGray
  1495.     ENDIF
  1496.  
  1497. ;
  1498. ; pascal CMError CMConvertXYZToFixedXYZ(const CMXYZColor *src, CMFixedXYZColor *dst, unsigned long count)
  1499. ;
  1500.     IF ¬ GENERATINGCFM THEN
  1501.         Macro
  1502.         _CMConvertXYZToFixedXYZ
  1503.             dc.w                $203C
  1504.             dc.w                $000C
  1505.             dc.w                $0056
  1506.             dc.w                $ABEE
  1507.         EndM
  1508.     ELSE
  1509.         IMPORT_CFM_FUNCTION CMConvertXYZToFixedXYZ
  1510.     ENDIF
  1511.  
  1512. ;
  1513. ; pascal CMError CMConvertFixedXYZToXYZ(const CMFixedXYZColor *src, CMXYZColor *dst, unsigned long count)
  1514. ;
  1515.     IF ¬ GENERATINGCFM THEN
  1516.         Macro
  1517.         _CMConvertFixedXYZToXYZ
  1518.             dc.w                $203C
  1519.             dc.w                $000C
  1520.             dc.w                $0057
  1521.             dc.w                $ABEE
  1522.         EndM
  1523.     ELSE
  1524.         IMPORT_CFM_FUNCTION CMConvertFixedXYZToXYZ
  1525.     ENDIF
  1526.  
  1527. ;  PS-related 
  1528. ;
  1529. ; pascal CMError CMGetPS2ColorSpace(CMProfileRef srcProf, unsigned long flags, CMFlattenUPP proc, void *refCon, Boolean *preferredCMMnotfound)
  1530. ;
  1531.     IF ¬ GENERATINGCFM THEN
  1532.         Macro
  1533.         _CMGetPS2ColorSpace
  1534.             dc.w                $203C
  1535.             dc.w                $0014
  1536.             dc.w                $002E
  1537.             dc.w                $ABEE
  1538.         EndM
  1539.     ELSE
  1540.         IMPORT_CFM_FUNCTION CMGetPS2ColorSpace
  1541.     ENDIF
  1542.  
  1543. ;
  1544. ; pascal CMError CMGetPS2ColorRenderingIntent(CMProfileRef srcProf, unsigned long flags, CMFlattenUPP proc, void *refCon, Boolean *preferredCMMnotfound)
  1545. ;
  1546.     IF ¬ GENERATINGCFM THEN
  1547.         Macro
  1548.         _CMGetPS2ColorRenderingIntent
  1549.             dc.w                $203C
  1550.             dc.w                $0014
  1551.             dc.w                $002F
  1552.             dc.w                $ABEE
  1553.         EndM
  1554.     ELSE
  1555.         IMPORT_CFM_FUNCTION CMGetPS2ColorRenderingIntent
  1556.     ENDIF
  1557.  
  1558. ;
  1559. ; pascal CMError CMGetPS2ColorRendering(CMProfileRef srcProf, CMProfileRef dstProf, unsigned long flags, CMFlattenUPP proc, void *refCon, Boolean *preferredCMMnotfound)
  1560. ;
  1561.     IF ¬ GENERATINGCFM THEN
  1562.         Macro
  1563.         _CMGetPS2ColorRendering
  1564.             dc.w                $203C
  1565.             dc.w                $0018
  1566.             dc.w                $0030
  1567.             dc.w                $ABEE
  1568.         EndM
  1569.     ELSE
  1570.         IMPORT_CFM_FUNCTION CMGetPS2ColorRendering
  1571.     ENDIF
  1572.  
  1573. ;
  1574. ; pascal CMError CMGetPS2ColorRenderingVMSize(CMProfileRef srcProf, CMProfileRef dstProf, unsigned long *vmSize, Boolean *preferredCMMnotfound)
  1575. ;
  1576.     IF ¬ GENERATINGCFM THEN
  1577.         Macro
  1578.         _CMGetPS2ColorRenderingVMSize
  1579.             dc.w                $203C
  1580.             dc.w                $0010
  1581.             dc.w                $003D
  1582.             dc.w                $ABEE
  1583.         EndM
  1584.     ELSE
  1585.         IMPORT_CFM_FUNCTION CMGetPS2ColorRenderingVMSize
  1586.     ENDIF
  1587.  
  1588. ;  ColorSync 1.0 functions which have parallel 2.0 counterparts 
  1589. ;
  1590. ; pascal CMError CWNewColorWorld(CMWorldRef *cw, CMProfileHandle src, CMProfileHandle dst)
  1591. ;
  1592.     IF ¬ GENERATINGCFM THEN
  1593.         Macro
  1594.         _CWNewColorWorld
  1595.             dc.w                $203C
  1596.             dc.w                $000C
  1597.             dc.w                $0000
  1598.             dc.w                $ABEE
  1599.         EndM
  1600.     ELSE
  1601.         IMPORT_CFM_FUNCTION CWNewColorWorld
  1602.     ENDIF
  1603.  
  1604. ;
  1605. ; pascal CMError ConcatenateProfiles(CMProfileHandle thru, CMProfileHandle dst, CMProfileHandle *newDst)
  1606. ;
  1607.     IF ¬ GENERATINGCFM THEN
  1608.         Macro
  1609.         _ConcatenateProfiles
  1610.             dc.w                $203C
  1611.             dc.w                $000C
  1612.             dc.w                $000C
  1613.             dc.w                $ABEE
  1614.         EndM
  1615.     ELSE
  1616.         IMPORT_CFM_FUNCTION ConcatenateProfiles
  1617.     ENDIF
  1618.  
  1619. ;
  1620. ; pascal CMError CMBeginMatching(CMProfileHandle src, CMProfileHandle dst, CMMatchRef *myRef)
  1621. ;
  1622.     IF ¬ GENERATINGCFM THEN
  1623.         Macro
  1624.         _CMBeginMatching
  1625.             dc.w                $203C
  1626.             dc.w                $000C
  1627.             dc.w                $000A
  1628.             dc.w                $ABEE
  1629.         EndM
  1630.     ELSE
  1631.         IMPORT_CFM_FUNCTION CMBeginMatching
  1632.     ENDIF
  1633.  
  1634. ;
  1635. ; pascal void CMDrawMatchedPicture(PicHandle myPicture, CMProfileHandle dst, Rect *myRect)
  1636. ;
  1637.     IF ¬ GENERATINGCFM THEN
  1638.         Macro
  1639.         _CMDrawMatchedPicture
  1640.             dc.w                $203C
  1641.             dc.w                $000C
  1642.             dc.w                $0009
  1643.             dc.w                $ABEE
  1644.         EndM
  1645.     ELSE
  1646.         IMPORT_CFM_FUNCTION CMDrawMatchedPicture
  1647.     ENDIF
  1648.  
  1649. ;
  1650. ; pascal CMError CMUseProfileComment(CMProfileHandle profile)
  1651. ;
  1652.     IF ¬ GENERATINGCFM THEN
  1653.         Macro
  1654.         _CMUseProfileComment
  1655.             dc.w                $203C
  1656.             dc.w                $0004
  1657.             dc.w                $0008
  1658.             dc.w                $ABEE
  1659.         EndM
  1660.     ELSE
  1661.         IMPORT_CFM_FUNCTION CMUseProfileComment
  1662.     ENDIF
  1663.  
  1664. ;
  1665. ; pascal void CMGetProfileName(CMProfileHandle myProfile, CMIString *IStringResult)
  1666. ;
  1667.     IF ¬ GENERATINGCFM THEN
  1668.         Macro
  1669.         _CMGetProfileName
  1670.             dc.w                $203C
  1671.             dc.w                $0008
  1672.             dc.w                $000E
  1673.             dc.w                $ABEE
  1674.         EndM
  1675.     ELSE
  1676.         IMPORT_CFM_FUNCTION CMGetProfileName
  1677.     ENDIF
  1678.  
  1679. ;
  1680. ; pascal long CMGetProfileAdditionalDataOffset(CMProfileHandle myProfile)
  1681. ;
  1682.     IF ¬ GENERATINGCFM THEN
  1683.         Macro
  1684.         _CMGetProfileAdditionalDataOffset
  1685.             dc.w                $203C
  1686.             dc.w                $0004
  1687.             dc.w                $000F
  1688.             dc.w                $ABEE
  1689.         EndM
  1690.     ELSE
  1691.         IMPORT_CFM_FUNCTION CMGetProfileAdditionalDataOffset
  1692.     ENDIF
  1693.  
  1694. ;  ProfileResponder functions 
  1695. ;
  1696. ; pascal CMError GetProfile(OSType deviceType, long refNum, CMProfileHandle aProfile, CMProfileHandle *returnedProfile)
  1697. ;
  1698.     IF ¬ GENERATINGCFM THEN
  1699.         Macro
  1700.         _GetProfile
  1701.             dc.w                $203C
  1702.             dc.w                $0010
  1703.             dc.w                $0005
  1704.             dc.w                $ABEE
  1705.         EndM
  1706.     ELSE
  1707.         IMPORT_CFM_FUNCTION GetProfile
  1708.     ENDIF
  1709.  
  1710. ;
  1711. ; pascal CMError SetProfile(OSType deviceType, long refNum, CMProfileHandle newProfile)
  1712. ;
  1713.     IF ¬ GENERATINGCFM THEN
  1714.         Macro
  1715.         _SetProfile
  1716.             dc.w                $203C
  1717.             dc.w                $000C
  1718.             dc.w                $0006
  1719.             dc.w                $ABEE
  1720.         EndM
  1721.     ELSE
  1722.         IMPORT_CFM_FUNCTION SetProfile
  1723.     ENDIF
  1724.  
  1725. ;
  1726. ; pascal CMError SetProfileDescription(OSType deviceType, long refNum, long deviceData, CMProfileHandle hProfile)
  1727. ;
  1728.     IF ¬ GENERATINGCFM THEN
  1729.         Macro
  1730.         _SetProfileDescription
  1731.             dc.w                $203C
  1732.             dc.w                $0010
  1733.             dc.w                $0010
  1734.             dc.w                $ABEE
  1735.         EndM
  1736.     ELSE
  1737.         IMPORT_CFM_FUNCTION SetProfileDescription
  1738.     ENDIF
  1739.  
  1740. ;
  1741. ; pascal CMError GetIndexedProfile(OSType deviceType, long refNum, CMProfileSearchRecordHandle search, CMProfileHandle *returnProfile, long *index)
  1742. ;
  1743.     IF ¬ GENERATINGCFM THEN
  1744.         Macro
  1745.         _GetIndexedProfile
  1746.             dc.w                $203C
  1747.             dc.w                $0014
  1748.             dc.w                $0012
  1749.             dc.w                $ABEE
  1750.         EndM
  1751.     ELSE
  1752.         IMPORT_CFM_FUNCTION GetIndexedProfile
  1753.     ENDIF
  1754.  
  1755. ;
  1756. ; pascal CMError DeleteDeviceProfile(OSType deviceType, long refNum, CMProfileHandle deleteMe)
  1757. ;
  1758.     IF ¬ GENERATINGCFM THEN
  1759.         Macro
  1760.         _DeleteDeviceProfile
  1761.             dc.w                $203C
  1762.             dc.w                $000C
  1763.             dc.w                $0013
  1764.             dc.w                $ABEE
  1765.         EndM
  1766.     ELSE
  1767.         IMPORT_CFM_FUNCTION DeleteDeviceProfile
  1768.     ENDIF
  1769.  
  1770.     IF OLDROUTINENAMES THEN
  1771. ;  constants 
  1772.  
  1773. kMatchCMMType                    EQU        $00000001
  1774. kMatchApplProfileVersion        EQU        $00000002
  1775. kMatchDataType                    EQU        $00000004
  1776. kMatchDeviceType                EQU        $00000008
  1777. kMatchDeviceManufacturer        EQU        $00000010
  1778. kMatchDeviceModel                EQU        $00000020
  1779. kMatchDeviceAttributes            EQU        $00000040
  1780. kMatchFlags                        EQU        $00000080
  1781. kMatchOptions                    EQU        $00000100
  1782. kMatchWhite                        EQU        $00000200
  1783. kMatchBlack                        EQU        $00000400
  1784. ;  types 
  1785. CMYKColor                RECORD 0
  1786. f                         ds        CMCMYKColor
  1787. sizeof                     EQU *                    ; size:   $8 (8)
  1788.                         ENDR
  1789.  
  1790.  
  1791. ; typedef CMWorldRef                     CWorld
  1792.  
  1793. ; typedef long *                        CMGamutResult
  1794.  
  1795. ;  functions 
  1796. ;
  1797. ; pascal void EndMatching(CMMatchRef myRef)
  1798. ;
  1799.     IF ¬ GENERATINGCFM THEN
  1800.         Macro
  1801.         _EndMatching
  1802.             dc.w                $203C
  1803.             dc.w                $0004
  1804.             dc.w                $000B
  1805.             dc.w                $ABEE
  1806.         EndM
  1807.     ELSE
  1808.         IMPORT_CFM_FUNCTION EndMatching
  1809.     ENDIF
  1810.  
  1811. ;
  1812. ; pascal void EnableMatching(Boolean enableIt)
  1813. ;
  1814.     IF ¬ GENERATINGCFM THEN
  1815.         Macro
  1816.         _EnableMatching
  1817.             dc.w                $203C
  1818.             dc.w                $0002
  1819.             dc.w                $000D
  1820.             dc.w                $ABEE
  1821.         EndM
  1822.     ELSE
  1823.         IMPORT_CFM_FUNCTION EnableMatching
  1824.     ENDIF
  1825.  
  1826. ;
  1827. ; pascal CMError GetColorSyncFolderSpec(short vRefNum, Boolean createFolder, short *foundVRefNum, long *foundDirID)
  1828. ;
  1829.     IF ¬ GENERATINGCFM THEN
  1830.         Macro
  1831.         _GetColorSyncFolderSpec
  1832.             dc.w                $203C
  1833.             dc.w                $000C
  1834.             dc.w                $0011
  1835.             dc.w                $ABEE
  1836.         EndM
  1837.     ELSE
  1838.         IMPORT_CFM_FUNCTION GetColorSyncFolderSpec
  1839.     ENDIF
  1840.  
  1841. ;
  1842. ; pascal CMError BeginMatching(CMProfileHandle src, CMProfileHandle dst, CMMatchRef *myRef)
  1843. ;
  1844.     IF ¬ GENERATINGCFM THEN
  1845.         Macro
  1846.         _BeginMatching
  1847.             dc.w                $203C
  1848.             dc.w                $000C
  1849.             dc.w                $000A
  1850.             dc.w                $ABEE
  1851.         EndM
  1852.     ELSE
  1853.         IMPORT_CFM_FUNCTION BeginMatching
  1854.     ENDIF
  1855.  
  1856. ;
  1857. ; pascal void DrawMatchedPicture(PicHandle myPicture, CMProfileHandle dst, Rect *myRect)
  1858. ;
  1859.     IF ¬ GENERATINGCFM THEN
  1860.         Macro
  1861.         _DrawMatchedPicture
  1862.             dc.w                $203C
  1863.             dc.w                $000C
  1864.             dc.w                $0009
  1865.             dc.w                $ABEE
  1866.         EndM
  1867.     ELSE
  1868.         IMPORT_CFM_FUNCTION DrawMatchedPicture
  1869.     ENDIF
  1870.  
  1871. ;
  1872. ; pascal CMError UseProfile(CMProfileHandle profile)
  1873. ;
  1874.     IF ¬ GENERATINGCFM THEN
  1875.         Macro
  1876.         _UseProfile
  1877.             dc.w                $203C
  1878.             dc.w                $0004
  1879.             dc.w                $0008
  1880.             dc.w                $ABEE
  1881.         EndM
  1882.     ELSE
  1883.         IMPORT_CFM_FUNCTION UseProfile
  1884.     ENDIF
  1885.  
  1886. ;
  1887. ; pascal void GetProfileName(CMProfileHandle myProfile, CMIString *IStringResult)
  1888. ;
  1889.     IF ¬ GENERATINGCFM THEN
  1890.         Macro
  1891.         _GetProfileName
  1892.             dc.w                $203C
  1893.             dc.w                $0008
  1894.             dc.w                $000E
  1895.             dc.w                $ABEE
  1896.         EndM
  1897.     ELSE
  1898.         IMPORT_CFM_FUNCTION GetProfileName
  1899.     ENDIF
  1900.  
  1901. ;
  1902. ; pascal long GetProfileAdditionalDataOffset(CMProfileHandle myProfile)
  1903. ;
  1904.     IF ¬ GENERATINGCFM THEN
  1905.         Macro
  1906.         _GetProfileAdditionalDataOffset
  1907.             dc.w                $203C
  1908.             dc.w                $0004
  1909.             dc.w                $000F
  1910.             dc.w                $ABEE
  1911.         EndM
  1912.     ELSE
  1913.         IMPORT_CFM_FUNCTION GetProfileAdditionalDataOffset
  1914.     ENDIF
  1915.  
  1916.     ENDIF
  1917.  
  1918. ;  PrGeneral parameter blocks 
  1919. TEnableColorMatchingBlk    RECORD 0
  1920. iOpCode                     ds.w    1                ; offset: $0 (0)
  1921. iError                     ds.w    1                ; offset: $2 (2)
  1922. lReserved                 ds.l    1                ; offset: $4 (4)
  1923. hPrint                     ds.l    1                ; offset: $8 (8)
  1924. fEnableIt                 ds.b    1                ; offset: $C (12)
  1925. filler                     ds.b    1                ; offset: $D (13)
  1926. sizeof                     EQU *                    ; size:   $E (14)
  1927.                         ENDR
  1928. TRegisterProfileBlk        RECORD 0
  1929. iOpCode                     ds.w    1                ; offset: $0 (0)
  1930. iError                     ds.w    1                ; offset: $2 (2)
  1931. lReserved                 ds.l    1                ; offset: $4 (4)
  1932. hPrint                     ds.l    1                ; offset: $8 (8)
  1933. fRegisterIt                 ds.b    1                ; offset: $C (12)
  1934. filler                     ds.b    1                ; offset: $D (13)
  1935. sizeof                     EQU *                    ; size:   $E (14)
  1936.                         ENDR
  1937.     ENDIF ; __CMAPPLICATION__ 
  1938.  
  1939.